﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace EFCore.Models;

[Table("TaskOrder")]
public partial class TaskOrder
{
    [Key]
    [Column("Id_TaskOrder")]
    public Guid IdTaskOrder { get; set; }

    public DateTime CreatTime { get; set; }

    /// <summary>
    /// 任务类型
    /// </summary>
    public string Type { get; set; } = null!;

    public string? OrderNo { get; set; }

    /// <summary>
    /// 任务状态-未下发/已下发
    /// </summary>
    public string State { get; set; } = null!;

    [Column("Id_Box")]
    public Guid IdBox { get; set; }

    /// <summary>
    /// 仓库坐标
    /// </summary>
    public string WarehouseCode { get; set; } = null!;

    /// <summary>
    /// 缓存坐标
    /// </summary>
    public string InlethouseCode { get; set; } = null!;

    /// <summary>
    /// 任务号
    /// </summary>
    public string TaskOrderCode { get; set; } = null!;

    /// <summary>
    /// 组优先级
    /// </summary>
    [Column("groupPriority")]
    public int? GroupPriority { get; set; }

    /// <summary>
    /// 任务优先级
    /// </summary>
    [Column("taskPriority")]
    public int? TaskPriority { get; set; }

    [ForeignKey("IdBox")]
    [InverseProperty("TaskOrders")]
    public virtual Box IdBoxNavigation { get; set; } = null!;
}
